<?
	require_once('init.php');
	require_once('dataModel.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> 
	<meta http-equiv="Content-Type" content="text/html; charset=<?=$lng_characset;?>" />
	<meta name="keywords" content="GreenCity,Shoes,鞋,男鞋,女鞋,外销" />
	<meta name="description" content="GreenCity" />
	<meta name="copyright" content="Copyright (c) 2011 www.GreenCity.com All Rights Reserved." />
	<meta name="publisher" content="Copyright (c) 2010 www.GreenCity.com All Rights Reserved." />
	<meta name="author" content="GreenCity Team" />
	
	<TITLE><?=$AllPageTitle;?></TITLE> 

	<link href="css/main.css" rel="stylesheet" type="text/css" />
	<!--link href="css/Buttonstyle.css" rel="stylesheet" type="text/css" /-->
	<link href="css/jquery.hiAlerts.css" rel="stylesheet" type="text/css" />
	<link href="css/login.css" rel="stylesheet" type="text/css" />

    <? include("alljs.php"); ?>
	<script><!--
		function changimages(){   
			vlen=document.getElementById("chleng").value ;   
			if (vlen==4) {
				document.getElementById("chleng").value=5;
			} else
	            {
				document.getElementById("chleng").value=4;
			}
	      	vlen=document.getElementById("chleng").value ; 
			imgobject=document.getElementById("verifyimge1"); 

			imgobject.src="CaptchaSecurityImages.php?width=100&height=40&characters="+vlen;
		 }		

		function registinfo()
		{
		    location="register.php";
		}

		function logininfo(url)
		{
			value=$("#txtuserName").attr("value");
			if (value=="") {
				hiAlert('<?=$strwriteuserid;?>', '<?=$strclueinfo;?>');
				$("#txtuserName").focus();
				return false;
			}	
			
			value=$("#txtvarify").attr("value");
			if (value=="") {
				hiAlert('<?=$strwritevarify;?>', '<?=$strclueinfo;?>');
				$("#txtvarify").focus();
				return false;
			}	
		   var strSQL = "";                      
		   strSQL+= "userName=";
		   strSQL+=$("#txtuserName").attr("value");
		   strSQL+="&userPWD=";
		   strSQL+=$("#txtuserPWD").attr("value");         
		   strSQL+="&varifyID=";
		   strSQL+=$("#txtvarify").attr("value");
		   strSQL+="&Type=LoginInfo";
		   $.post("varifyData.php",strSQL,function(msg){
			   	if (msg==-1){	
				   	hiAlert('<?=$strvarifyw;?>', '<?=$strclueinfo;?>');
			   	  	$("#txtvarify").focus();
			   	  	return false;
			   	}
			   	if (msg==2){	
				   	hiAlert('<?=$struseridw;?>', '<?=$strclueinfo;?>');
			   	  	$("#txtuserName").focus();
			   	  	return false;
			   	}    
			   	if (msg==1){	
			   		self.location="body2.php";
			   	}   
		   })       				
		}		
	</script>
	 
</head>

	<body>
		<?
		include("header.php"); 
		?>
		
		<div id="body2_h01" ></div>
		
		<div class="login_div">

			<div class="login-a01">   <!--登陆-->
				<div class="login-a02"></div>   <!--登陆头-->

				<!--放置一隐藏控件，用于存储存校验码长度-->
				<input type="hidden" name=="chleng" id="chleng" value="4">
		
				<div class="login-a03">   <!--登陆体-->
					<!--div class="login_x01">
						<div class="login_x02"><b><?=$struserlogin;?></b></div>
					</div-->
					
					<div class="login-a04" style="margin-top:30px;"><b><?=$struserid;?>:</b></div>   <!--账号-->
					<div class="login-a05" style="margin-top:30px;"><input type="text" id="txtuserName" class="textboxclas"></div>
					
					<div class="login-a04" style="margin-top:10px;"><b><?=$struserpwd;?>:</b></div>   <!--密码-->
					<div class="login-a05" style="margin-top:10px;">
						<input type="password" id="txtuserPWD" class="textboxclas">
					    <div><a href="forgetpassword.php"><?=$strforgetpassword;?></a></div>

					</div>
					
					<div class="login-a04" style="margin-top:10px;"><b><?=$strvarify;?>:</b></div>   <!--密码-->
					<div class="login-a05" style="margin-top:10px;">
						<input type="text" id="txtvarify" class="textboxclas"/>
						<img id="verifyimge1" src="CaptchaSecurityImages.php?width=100&height=40&characters=4"  border="0" 
             			onclick="changimages();" alt="<?=$strchangimages;?>"  Title="<?=$strchangimages;?>" />
					</div>

					<div class="login-a04" style="width:570px;margin-top:30px;text-align:center;">    <!--登陆按钮-->
					    <input type="image" name="button_login" value="button_login" src="images/login_btn.gif" onclick="javascript:logininfo('<?=$_SERVER['HTTP_REFERER'];?>');" >
					</div>  
					
				</div>
	
			</div>	

			<div class="login-a11">   <!--注册-->
				<div class="login-a12"></div>   <!--注册头-->
		
				<div class="login-a13">   <!--注册体-->
					<!--div class="login_x01" style="width: 346px;">
						<div class="login_x02"  style="width: 346px;"><b><?=$struserregist;?></b></div>
					</div-->

			    	<div class="login-a14"></div>
			    	<div class="login-a14"><?=$strregistdetail1;?></div>
			    	<div class="login-a14"><?=$strregistdetail2;?></div>
			    	<div class="login-a14"><?=$strregistdetail3;?></div>
			    	<div class="login-a14"><?=$strregistdetail4;?></div>
			    	<div class="login-a14"><?=$strregistdetail5;?></div>
			    	<div class="login-a14"><?=$strregistdetail6;?></div>
			    	<div class="login-a14"><?=$strregistdetail7;?> </div>

					<div class="login-a04" style="width:350px;text-align:center;">    <!--登陆按钮-->
					    <input type="image" name="button_regist" value="button_regist" src="images/regist_btn.gif" onclick="javascript:registinfo();" >
					</div>  
				
				</div>
	
			</div>	

		</div> 
		<div id="body2_h02" ></div>
		
		<?
		include("footer.php"); 
		?>
	</body>		
</html>
